package com.ftwj.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ftwj.entity.SchoolPlaceInfo;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Param;
import org.mapstruct.Mapper;

import java.util.List;
import java.util.Map;

@Mapper
public interface SchoolPlaceMapper {
    @MapKey("resultType")
    IPage<Map<String ,Object>>selectSchoolPlaceInfoByName(Page<Object>page,
                                                           @Param("name") String name
                                                           );
    @MapKey("resultType")
    IPage<Map<String ,Object>>selectSchoolPlaceInfoAll(Page<Object>page
    );

    int insertSchoolPlaceInfo(SchoolPlaceInfo schoolPlaceInfo);

    int updateSchoolPlaceInfo(SchoolPlaceInfo schoolPlaceInfo);

    int updateSchoolPlaceOpenState(SchoolPlaceInfo schoolPlaceInfo);

    int deleteSchoolPlaceInfoById(@Param("id") String id);

    String findIdByName(@Param("name") String name);

}
